how to read and display elements of array in c